POV-Ray : Newsgroups : povray.binaries.images : Glow splines - Attn Andy Cocker, et al : Glow splines - Attn Andy Cocker, et al Server Time
19 Aug 2024 10:22:40 EDT (-0400)
  Glow splines - Attn Andy Cocker, et al  
From: Alan Holding
Date: 5 Dec 2000 19:22:51
Message: <3a2d86db@news.povray.org>
Hello, all.

This will all link up in a minute...

A while ago, Chris Colefax was very kind in supplying me with a MegaPOV
compatible version of his Spline Macro File.

After reading Andy Cocker's recent posts about trying to write a macro which
could do 'glows on a string', I tried to see if I could use Chris's macro to
come up with a solution.  And I think I have, as the attached image shows.

For those unfamiliar with the Spline Macro, apologies for the next bit.

To make the image, I defined a glow as a spline_object like this...

#macro spline_object ()
   glow {type 1 location sPos colour rgb
<1.35-(sProgress*1.5),0.5,sProgress> size 0.01}
#end

...the important bit being the 'location sPos' part, which gets around the
fact that glows can't be transformed as the Spline Macro defines where the
glow should go in the 'chain' via the sPos variable.

Next, I defined a spline for the glows to follow...

#local glow_spline=create_spline (
  array[4] {<-40,0,0>,<-10,50,0>,<30,-80,0>,<40,20,0>},
  create_bezier_spline + spline_tension (0.4) + spline_sampling (on) +
spline_loop (no)
)

...and finally called the finished spline:

create_spline_object (glow_spline, spline_steps (40) + spline_radius (0.1))

Bingo.  Glows on a chain.

I'd post the code in p.t.s-f, but I don't think Chris has made the MegaPOV
version of his Spline Macro publically available yet.

Chris?  Am I OK to post it?

Bye,
Alan.


Post a reply to this message


Attachments:
Download 'glow_spline.jpg' (11 KB)

Preview of image 'glow_spline.jpg'
glow_spline.jpg


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.